import Vue from 'vue'
import Vuex from 'vuex'
import actions from '../actions/intel-sea'
import  {
  UPDATE_INTEL_SEA_FILTER_DATA
} from '../mutation-types'

Vue.use(Vuex)

const defaultIntelSeaFilterData = {
  'mobile_num': '',
  'parent_name': '',
  'source_id': '',
  'channel_id': '',
  'custom_status': '',
  'income_type': '',
  'insert_sea_time': '',
  'team_id': '',
  'suid': ''
}

const state = {
  defaultIntelSeaFilterData: defaultIntelSeaFilterData,
  intelSeaFilterData: {
    ...defaultIntelSeaFilterData
  }
}

const mutations = {
  [UPDATE_INTEL_SEA_FILTER_DATA] (state, data) {
    state.intelSeaFilterData = data
  }
}

export default {
  state,
  mutations,
  actions
}
